#include "bits/stdc++.h"

using namespace std;

#define int long long
#define endl '\n'

#define N 5010

int e[N];
set<pair<int, int>> st;

void solve() {
    int n, p, h, m;
    int l, r;

    cin >> n >> p >> h >> m;
//    e[p] = h;

    st.clear();
    while (m-- && cin >> l >> r) {
        if (l > r) swap(l, r);
        pair<int, int> pr(l, r);
        if (st.count(pr)) continue;
        e[l + 1]--;
        e[r]++;
        st.insert(pr);
    }

    for (int i = 1; i <= n; i++) {
        e[i] += e[i - 1];
        cout << e[i] + h << endl;
    }
}

signed main() {
   ios::sync_with_stdio(false);
   cin.tie(nullptr), cout.tie(nullptr);
   solve();
   return 0;
}
